USE [ERP]
GO

/****** Object:  Table [dbo].[EmployeePersonalInfo]    Script Date: 11/16/2009 14:33:13 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[EmployeePersonalInfo](
	[EmployeeID] [nvarchar](50) NOT NULL,
	[BirthDate] [datetime] NULL,
	[Gender] [int] NULL,
	[RelegionID] [nvarchar](50) NULL,
	[MotherName] [nvarchar](50) NULL,
	[PlaceOfBirth] [nvarchar](50) NULL,
	[SocialStatus] [int] NULL,
	[EducationLevelID] [nvarchar](50) NULL,
 CONSTRAINT [PK_EmployeePersonalInfo] PRIMARY KEY CLUSTERED 
(
	[EmployeeID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[EmployeePersonalInfo]  WITH CHECK ADD  CONSTRAINT [FK_EmployeePersonalInfo_EducationLevels] FOREIGN KEY([EducationLevelID])
REFERENCES [dbo].[EducationLevels] ([ID])
GO

ALTER TABLE [dbo].[EmployeePersonalInfo] CHECK CONSTRAINT [FK_EmployeePersonalInfo_EducationLevels]
GO

ALTER TABLE [dbo].[EmployeePersonalInfo]  WITH CHECK ADD  CONSTRAINT [FK_EmployeePersonalInfo_Employees] FOREIGN KEY([EmployeeID])
REFERENCES [dbo].[Employees] ([ID])
GO

ALTER TABLE [dbo].[EmployeePersonalInfo] CHECK CONSTRAINT [FK_EmployeePersonalInfo_Employees]
GO

ALTER TABLE [dbo].[EmployeePersonalInfo]  WITH CHECK ADD  CONSTRAINT [FK_EmployeePersonalInfo_Relegions] FOREIGN KEY([RelegionID])
REFERENCES [dbo].[Relegions] ([ID])
GO

ALTER TABLE [dbo].[EmployeePersonalInfo] CHECK CONSTRAINT [FK_EmployeePersonalInfo_Relegions]
GO

